package com.myway.dto.ics;

import java.util.List;


/**
 *
 *
 * @author vunloon
 * @since May 17, 2008
 **/
public class DTOMainCabin implements java.io.Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4006396873831300958L;
	private long cabinId;
	private String cabin;
	private Integer totalSeat=0;
	private Integer soldCount=0;
	private Integer reservedCount=0;
	private String state;
	private List<DTOSubCabin> subcabins;
	private long inventory;
	
	/**
	 * Number of seat oversold
	 */
	private Integer oversoldCount = 0;
	
    /**
     * 
     * @return 
     */
	public String getState() {
		return state;
	}
    /**
     * 
     * @param state 
     */
	public void setState(String state) {
		this.state = state;
	}
    /**
     * 
     * @return 
     */
	public long getCabinId() {
		return cabinId;
	}
    /**
     * 
     * @param cabinId 
     */
	public void setCabinId(long cabinId) {
		this.cabinId = cabinId;
	}
    /**
     * 
     * @return 
     */
	public String getCabin() {
		return cabin;
	}
    /**
     * 
     * @param cabin 
     */
	public void setCabin(String cabin) {
		this.cabin = cabin;
	}
    /**
     * 
     * @return 
     */
	public Integer getTotalSeat() {
		return totalSeat;
	}
    /**
     * 
     * @param totalSeat 
     */
	public void setTotalSeat(Integer totalSeat) {
		this.totalSeat = totalSeat;
	}
    /**
     * 
     * @return 
     */
	public Integer getSoldCount() {
		return soldCount;
	}
    /**
     * 
     * @param soldCount 
     */
	public void setSoldCount(Integer soldCount) {
		this.soldCount = soldCount;
	}
    /**
     * 
     * @return 
     */
	public List<DTOSubCabin> getSubcabins() {
		return subcabins;
	}
    /**
     * 
     * @param subcabins 
     */
	public void setSubcabins(List<DTOSubCabin> subcabins) {
		this.subcabins = subcabins;
	}
    /**
     * 
     * @return 
     */
	public Integer getReservedCount() {
		return reservedCount;
	}
    /**
     * 
     * @param reservedCount 
     */
	public void setReservedCount(Integer reservedCount) {
		this.reservedCount = reservedCount;
	}
	
	@Override
	public String toString() {
		StringBuffer buf = new StringBuffer();
		buf.append("[").append(getCabinId()).append("] ")
			.append(getCabin())
			.append(" ")
			.append(getState())
			.append(" Total: ")
			.append(getTotalSeat())
			.append(" Sold: ")
			.append(getSoldCount())
			.append(" Reserved: ")
			.append(getReservedCount());
		return buf.toString();
	}
	public Integer getOversoldCount() {
		return oversoldCount;
	}
	public void setOversoldCount(Integer oversoldCount) {
		this.oversoldCount = oversoldCount;
	}
	
	/**
	 * @return the inventory
	 */
	public long getInventory()
	{
		return inventory;
	}
	
	/**
	 * @param inventory the inventory to set
	 */
	public void setInventory(long inventory)
	{
		this.inventory = inventory;
	}
	
}
